package com.woniuxy.crm.entity;

import com.woniuxy.crm.Menus.OdersMenum;
import lombok.Builder;
import lombok.Getter;
import lombok.Setter;

import java.math.BigDecimal;
import java.time.LocalDateTime;

@Setter
@Getter
@Builder
public class Oders {
    private int id,customerId,managerId;
    private OdersMenum status;
    private String  remark,no;
    private LocalDateTime addTime;
    private BigDecimal money;

    public Oders() {
    }

    public Oders(int id, int customerId, int managerId, OdersMenum status, String remark, String no, LocalDateTime addTime, BigDecimal money) {
        this.id = id;
        this.customerId = customerId;
        this.managerId = managerId;
        this.status = status;
        this.remark = remark;
        this.no = no;
        this.addTime = addTime;
        this.money = money;
    }

    //    public void setOrderItems(int itemId, BigDecimal price, int sum) {
//        for (OrderItem item : orderItems) {
//            if (item.getId() == itemId) {
//                item.setPrice(price);
//                item.setNum(sum);
//                return;
//            }
//        }
//        OrderItem newItem = new OrderItem(itemId, price, sum);
//        orderItems.add(newItem);
//    }
//
//    public List<OrderItem> getOrderItems(int id) {
////        id = this.id;
//        if (this.id == id) {
//            return orderItems;
//        }
//        return null;
//    }
}
